package com.qtjf.qtmoneyservice.activity;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.qtjf.qtmoneyservice.R;
import com.qtjf.qtmoneyservice.utils.OperatorUtils;

public class ForgetPasswordActivity extends AppCompatActivity {

    TextView tipText;
    ImageView tipImg;
    String phoneNumber="";
    ImageView mBack;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_forget_password);

        Intent intent=getIntent();
        phoneNumber=intent.getStringExtra("phoneNumber");

        tipText= (TextView) findViewById(R.id.tip_text);
        tipImg= (ImageView) findViewById(R.id.tip_img);
        mBack= (ImageView) findViewById(R.id.back_bt);

        if(OperatorUtils.execute(phoneNumber).equals("移动"))
        {
            tipImg.setImageResource(R.mipmap.yidong_tip_img);
            tipText.setText("移动运营商服务密码重置指南");
        }else  if(OperatorUtils.execute(phoneNumber).equals("联通"))
        {
            tipText.setText("联通运营商服务密码重置指南");
            tipImg.setImageResource(R.mipmap.liantong_tip_img);
        }else  if(OperatorUtils.execute(phoneNumber).equals("电信"))
        {
            tipText.setText("电信运营商服务密码重置指南");
            tipImg.setImageResource(R.mipmap.dianxin_tip_img);
        }else{
            tipText.setText("移动运营商服务密码重置指南");
            tipImg.setImageResource(R.mipmap.yidong_tip_img);
        }


        mBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                ForgetPasswordActivity.this.finish();
            }
        });
    }
}
